package com.wondersgroup.fjzlpt.org.dao.impl.tdgl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.alibaba.fastjson.JSONObject;
import com.quick.framework.boot.repository.sql.bean.SQLBean;
import com.quick.framework.boot.repository.sql.bean.table.TableBean;
import com.quick.framework.boot.repository.sql.jdbcTemplate.impl.BaseJTDAOImpl;
import com.wondersgroup.fjzlpt.org.dao.inter.tdgl.TdshDao;

@Repository
public class TdshDaoImpl extends BaseJTDAOImpl implements TdshDao {

	@Override
	@Autowired
	@Qualifier("TB_TDGL_TDSH")
	public void setTb(TableBean tb) {
		super.setTb(tb);
	}

	@Override
	public JSONObject queryTdshxx(Map<String, String> map) {
		StringBuffer sqlBuf = new StringBuffer("select * from ").append(this.tb.getTableName()).append(" where TDID = ? order by SHTJSJ");
		SQLBean bean = new SQLBean(sqlBuf.toString(),map.get("TDID"));
		JSONObject resultJsonObject  = super.queryOne(bean);
		return resultJsonObject;
	}

	
}
